package lab02.Test28;

import java.util.InputMismatchException;
import java.util.Scanner;

/**
 * Created by 李晓容 on 2017/12/31.
 */
public class Test {
    public static void main(String[] args) {
        double r = 0;
        Scanner scanner=new Scanner(System.in);
        System.out.println("请输入圆的半径：");
        try{
            r=scanner.nextDouble();
        }catch (InputMismatchException e){
            System.out.println("类型不匹配！！");
        }finally {
            double area=3.14*r*r;
            System.out.println("圆的面积为："+area);
        }
    }
}
